<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { remset } from "./utils/remset.js";
export default {
  name: "App",
  metaInfo() {
    return {
      title:
        this.$store.state.settings.dynamicTitle &&
        this.$store.state.settings.title,
      titleTemplate: (title) => {
        return title
          ? `${title} - ${process.env.VUE_APP_TITLE}`
          : process.env.VUE_APP_TITLE;
      },
    };
  },
  methods: {
    showtypeset: function () {
      let w = document.documentElement.offsetWidth || document.body.offsetWidth;
      // console.log(w);
      if (w >= 1190) {
        this.showtype = "normal";
        // console.log('大于等于1190的正常屏幕===参考1190设计稿')
      } else if (990 <= w && w < 1190) {
        this.showtype = "middle";
        // console.log('大于等于990小于1190的中等屏幕===参考990设计稿')
      } else if (w < 990) {
        this.showtype = "small";
        // console.log('小于990的小屏幕 用rem适配移动端===参考移动端设计稿')
      }
    },
  },
  mounted() {
    remset(1920);
    let that = this;
    this.showtypeset();
    window.onresize = () => {
      that.showtypeset();
      remset(1920);
    };
    // let that = this;
    // setTimeout(() => {
    //     that.currentTime = new Date().getTime();
    //     that.lastTime = new Date().getTime()+1*60*1000;
    //     window.clearInterval(that.setIntervaltestTime);
    //     that.setIntervaltestTime = window.setInterval(that.testTime, 1000);
    // }, 0);
  },
};
</script>
<style>
.border {
  line-height: 40px !important;
  margin-bottom: 20px;
  border-bottom: 2px solid #ccc;
}

.border::after {
  border-bottom: 0px solid #ccc !important;
}

.el-scrollbar__view {
  line-height: 0px;
  margin-top: -6px;
}

.el-dialog__header {
  line-height: 0px;
  padding-top: 10px;
}

.el-form {
  line-height: 33px;
}
.mb8 {
  line-height: 0;
}
.app-breadcrumb.el-breadcrumb .no-redirect {
  color: #d9d9d9 !important;
}
h3 {
  font-size: 15px;
}
.head-container {
  line-height: 0;
}
.el-card__header {
  font-size: 20px;
}
.dialog-footer {
  line-height: 0;
}
.el-table th.el-table__cell > .cell {
  line-height: 15px;
}
</style>